Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
e34abff to
181853d
Compare
181853d to
7384a59
Compare
7384a59 to
5c9f906
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
evlog@2.14.0
Minor Changes
#295
aa9984fThanks @HugoRCD! - Expose AI SDK execution metadata as a public API onAILogger. Three new methods let app code read the same data that gets attached to wide events:getMetadata()returns an immutable snapshot of the run (model, provider, tokens, calls, steps, tool calls, cost, finish reason, embeddings),getEstimatedCost()returns the dollar cost computed from the configured pricing map, andonUpdate(cb)subscribes to incremental snapshots emitted on every step, embedding, error, and integration finish (returns an unsubscribe function). New typesAIMetadata(alias forAIEventData) andAIMetadataListenerare exported.modelandprovideronAIMetadataare now optional to reflect early-snapshot reality (e.g. embedding-only runs).#302
7060006Thanks @HugoRCD! - Add first-class audit logs as a thin layer over existing evlog primitives. Audit is not a parallel system: it is a typedauditfield on the wide event plus a few opt-in helpers and drain wrappers. Companies already running evlog can enable audit logs by adding 1 enricher + 1 drain wrapper +log.audit(), with zero new sub-exports.New API on the main
evlogentrypoint:AuditFieldsreserved onBaseWideEvent(action,actor,target,outcome,reason,changes,causationId,correlationId,version,idempotencyKey,context,signature,prevHash,hash) plusAUDIT_SCHEMA_VERSION.log.audit(fields)andlog.audit.deny(reason, fields)onRequestLoggerand the return value ofcreateLogger(). Sugar overlog.set({ audit })that also force-keeps the event through tail sampling.audit(fields)for jobs / scripts / CLIs.withAudit({ action, target, actor? })(fn)higher-order wrapper that auto-emitssuccess/failure/deniedbased on the wrapped function's outcome (withAuditDeniedErrorfor AuthZ refusals).defineAuditAction(name, opts)typed action registry,auditDiff(before, after)redact-aware JSON Patch helper,mockAudit()test utility (expectIncludes,expectActionCount,clear,restore).auditEnricher({ tenantId?, betterAuth? })enricher that auto-fillsevent.audit.context(requestId,traceId,ip,userAgent,tenantId) and optionally bridgesactorfrom a session.auditOnly(drain, { await? })drain wrapper that filters to events withevent.auditset, optionally awaiting writes for crash safety.signed(drain, { strategy: 'hmac' | 'hash-chain', ... })generic tamper-evidence wrapper with pluggablestate.{load,save}for hash chains.auditRedactPresetstrict PII preset composable with existingRedactConfig.Audit events are always force-kept by tail sampling and get a deterministic
idempotencyKeyderived fromaction + actor + target + timestampso retries are safe across drains. Schema is OTEL-compatible and theactor.type === 'agent'slot carriesmodel,tools,reason,promptIdfor AI agent auditing. No new sub-exports were added.